
with Ada.Unchecked_Deallocation;

package Projet_Types is


   subtype Coefficient is Positive range 1 .. 8;
   subtype Valeur is Natural range 0 .. 2000;
   subtype Longueur is Natural range 0 .. 20;
   type Etat is (LIBRE, ATTRIBUEE, SIMULEE);
   type Note (Selon : Etat := LIBRE) is record
      case selon is
         when LIBRE => null;
         when Attribuee => Une_Valeur : Valeur;
         when Simulee => Valeur_Sim : Valeur;
      end case;
   end record;
   type Matiere (Selon : Longueur := 0) is record
      Un_Intitule : String (1 .. Selon);
      Un_Coefficient : Coefficient := 1;
      Une_Note : Note;
   end record;

   subtype Nombre is natural range 0 .. 10;
   type Matieres is array (nombre range <>) of Matiere;
   type pointeur_matieres is access matieres;

   type bulletin(nb_matieres :nombre := 0) is record
      objectif : Valeur;
      les_matieres : pointeur_matieres;
   end record;

    procedure delete is new Ada.Unchecked_Deallocation(Matieres,pointeur_matieres);
end Projet_Types;

